home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / scheme / scheme2c / rec-28se.pat / README.kit < prev    next >
Encoding:
Text File  |  1994-06-30  |  7.6 KB  |  199 lines

  1. Greetings -
  2.  
  3.   Enclosed are the patches to 28sep90 Scheme->C for the Sparc and
  4. Intel 386 architectures.  These were built by Roger Critchlow, who can
  5. be reached as rec@arris.com or rec@elf.org.  There are the following
  6. files enclosed in this shar archive:
  7.  
  8.   README - this informative file.
  9.   patches - context diffs for the combined sparc and i386 changes
  10.     to the 28sep90 sources.  These modify the following files:
  11.       makefile
  12.       scrt/apply.h
  13.       scrt/callcc.c
  14.       scrt/cio.c
  15.       scrt/heap.c
  16.       scrt/heap.h
  17.       scrt/makefile-tail
  18.       scrt/objects.h
  19.       scrt/scinit.c
  20.       scrt/signal.c
  21.       scsc/makefile-tail
  22.       test/makefile-tail
  23.       test/test16.sc
  24.   sources - a shar archive of additional source files to be extracted
  25.     after the distribution source tree has been built.  This has:
  26.       scrt/sparc.s - the sparc assembly assist, sans protected
  27.         fixnum routines.
  28.       scrt/i386.s - an empty i386 assembly assist.
  29.       SPARC - the sparc configuration header.
  30.       I386 - a generic intel 386 configuration header.
  31.       ISC386IX - an Interactive Systems 386/ix specific
  32.         configuration header.
  33.       xlib/xwss.sch - a scheme header file for the only xlib
  34.         source that doesn't already have one.
  35.   tar.fix - a script to extract 28sep90 on System V and rewrite file
  36.     names to the 14 character limit.  It extracts the archive four
  37.     times, moves files to shorter names, and edits the makefiles.
  38.     You need to edit it to tell it where to put the source tree
  39.     and the temporary files.
  40.   tar.unfix - a script to restore the files hacked by tar.fix to their
  41.     original glory.  Only useful if you have a tar built on SysV
  42.     which needs to go back to the BSD world.
  43.   shlibs - a shar archive of files for building System V.3.2 shared
  44.     libraries for the scheme runtime and the xlib interface.  This
  45.     contains:
  46.       shlibsc/ - a directory for building the shared libsc.a.
  47.       shlibsc/makefile - a makefile for building the shared libsc.a.
  48.       shlibscx/ - a directory for building the shared version of
  49.         scixl.a, which I call libscx.a.
  50.       shlibscx/makefile - a makefile for building the shared
  51.         libscx.a.
  52.       shlibscx/xlib.export - a list of symbols from the C xlib
  53.         interface which must be exported from libscx.a.
  54.       shlibscx/hexname.sc - a scheme program for converting scheme
  55.         header files containing (define-external ...) forms
  56.         into lists of exportable names.  I planned to include
  57.         the list, but it's 90Kb and it isn't that hard to generate.
  58.     
  59. Configuration notes:
  60.  
  61.   The patches to the root makefile allow one to make a version of
  62. Scheme->C on top of the source distribution.  It does this by moving
  63. the distributed makefiles out of the way where necessary so that the
  64. version specific information can be prepended.  The forI386,
  65. forISC386IX, and forSPARC targets use this facility.
  66.  
  67.   There are a few patches to the scrt, scsc, and test makefiles which
  68. make them more useful when CC != cc and -lm is not the only library
  69. required.  The SPARC and *386 headers have been modified to take these
  70. patches into account.
  71.  
  72. System V portability notes:
  73.  
  74.   My System V machine is a 386 with 8 Mb of RAM and 300 Mb of disk.
  75.     ISC 386/ix version 2.0.2, ie UNIX System V.3.2
  76.     ISC TCP/IP version 1.1.2
  77.       (but no network connection)
  78.     ISC X Windows version 1.1, ie MIT X11R3/p
  79.     Gnu gcc version 1.37.1
  80. Scheme->C was compiled with gcc but linked with the ISC development tools.
  81.  
  82.   The conditionals for the 386 are separated into SYSV, for those which
  83. depend on the features (or the nonfeatures) of System V, I386, for those
  84. which I believe to be useful for any Intel 386 hosted Unix, and ISC386IX,
  85. for those which appear to be dependent on the Interactive Systems Corp.
  86. version of System V.3.2 386 Unix.
  87.  
  88.   There have been successful ports of Scheme->C to both Xenix and SCO
  89. Unix on the 386, but neither of these ports used the X11 libraries.
  90.  
  91.   System V doesn't do symbolic links.  Use the new inplaceCPU target
  92. in the root makefile to build the objects in place.
  93.  
  94.   System V doesn't have ranlib.  Make a command file named ranlib
  95. which runs 'ar rs' on the archive instead.  Like this:
  96.  
  97. cat > /usr/local/bin/ranlib << 'END /usr/local/bin/ranlib'
  98. #!/bin/sh
  99. for f in $*; do ar rs $f; done
  100. END /usr/local/bin/ranlib
  101. chmod +x /usr/local/bin/ranlib
  102.  
  103.   System V tar complains vociferously about lots of stuff which makes
  104. no difference.  Ignore it.  It won't say anything about the real
  105. violence it does when filenames get truncated.
  106.  
  107.   System V install is not equivalent to BSD install.  All
  108. installations need to be done by hand, unless you have the ISC X
  109. windows package on line in which case you can use this:
  110.  
  111. ed - /usr/bin/X11/bsdinstall << 'END /usr/bin/X11/bsdinstall'
  112. /install -f/s;;/etc/&;
  113. w /usr/local/bin/install
  114. q
  115. END /usr/bin/X11/bsdinstall
  116. chmod +x /usr/local/bin/install
  117.  
  118.   System V ar refuses to ranlib xlib/xlib.a (too many symbols!) and ld
  119. refuses to link against archives without ranlib symbol tables.  (UNIX
  120. used to be known as a system designed for software development.)  Just
  121. build a partially linked object with 'ld -r -o xlib.o' and pretend it's
  122. a library.  You didn't really care about the size of your binaries,
  123. did you?
  124.  
  125.   The System V signal handling interface didn't work as it should
  126. have, but thanks to tih@barsoom.nhh.no (Tom Ivar Helbekkmo) we now
  127. have a much better implementation.
  128.  
  129.   The replacement I used for select() in scrt/cio.c is a version of
  130. sigpoll() which ISC has extended beyond the SV3.2 specification.
  131. Other implementations of System V may need other solutions.  Actually,
  132. Joel built select() into the runtime at the scheme level, so both the
  133. sigpoll() hack and ISC's libinet.a version of select() are used in the
  134. current runtime support.
  135.  
  136. System V shared libraries:
  137.  
  138.   The order of making is:
  139.  
  140.     edit tar.fix to set directories
  141.     tar.fix
  142.     unshar sources
  143.     unshar shlibs
  144.     patch <patches
  145.     edit shlibsc/makefile to set directories and read instructions
  146.     edit ISC386IX or I386 to set directories and CFLAGS for shared
  147.     make port
  148.  
  149.   It is essential that you read the instructions in shlibsc/makefile.
  150. You need to patch some binary modules in /usr/lib/libinet.a among
  151. other nastinesses.
  152.  
  153.     cd shlibsc; make
  154.     cd shlibsc; /bin/su root -c 'make install'
  155.  
  156.   At this point you will have a shared scheme runtime library, a
  157. scheme interpreter linked against the shared library, and a scheme
  158. compiler linked agains the shared library.  It is important that the
  159. scheme compiler be installed at this point since it will be used to
  160. build xlib and the list of exported names for xlib.
  161.  
  162.     cd xlib; make scxl.a
  163.  
  164. Note that the make of scxl.a will fail when ar discovers how many symbols
  165. it is supposed to index.  Don't worry, that's why we're making a shared
  166. library.
  167.  
  168.     edit shlibscx/makefile to set directories
  169.     cd shlibscx; make
  170.     cd shlibscx; /bin/su root -c 'make install'
  171.  
  172.   At this point you will have a shared scheme xlib and libX library
  173. and a scheme interpreter linked against the xlib support.
  174.  
  175.   IMPORTANT NOTE:  I don't have a network interface on my machine, so the
  176. TCP/IP portion of xlib has never been tested.  All of this works fine with
  177. a local connection.
  178.  
  179. Sparc portability notes:
  180.  
  181.   The Bigendian changes are confined to objects.h, but they make a
  182. hash of the source.  They are currently conditionalized on SPARC, but
  183. ought to be more specifically identified.
  184.  
  185.   The MATHTRAPS code remains to be written.  There is a trap on
  186. overflow instruction on the Sparc and a software trap number assigned
  187. to integer overflow traps defined in the system headers.  It shouldn't
  188. be too hard.
  189.  
  190.   There are a handful of Little-endian dependent tests in test/test16.sc
  191. which are patched to look at a list of big-endian machine names and
  192. apply the correct interpretation to their results.
  193.  
  194. I386 portability notes:
  195.  
  196.   The MATHTRAPS code remains to be written.  I have no idea if it can be
  197. done or not.
  198.  
  199.